﻿
<%


set conn=server.createobject("adodb.connection")
connstr="Driver={SQL Server};SERVER=N-SERVER\MSSQLSERVER2;UID=sa;Password=jckj2008;DATABASE=UnexDB2"
conn.open connstr
%>

<HTML>
<HEAD>
<TITLE>A M K E Y</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<link href="../css/StyleSheet.css" rel="stylesheet" type="text/css">
<%=JSBkMenu_S%>
<SCRIPT language=JavaScript src="../menu/mmenu.js" type="text/javascript"></SCRIPT>

<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</HEAD>
<BODY BGCOLOR="WHITE" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<table width="833" border="0" cellspacing="0" cellpadding="1" align="left">
  <tr>
    <td width="831" height=58 align=center valign=top><form name="form1" method="post" action="outcheck.asp">
      <table width="99%" border="1" cellspacing="0" cellpadding="0">
        <tr>
          <td width="6%" align="right" bgcolor="#efefef">日期:&nbsp;</td>
          <td width="32%" align="left">&nbsp;
                <input name="startDate" type="text" value="" size="15" maxlength="15">
            格式(8/12/2011)</td>
          <td width="8%" align="left">跟踪号</td>
          <td width="25%" align="left"><input name="trackingno" type="text" size="25" maxlength="25"></td>
          <td width="7%" align="right" bgcolor="#efefef">帐号:&nbsp;</td>
          <td width="14%" align="left">&nbsp;
                <input name="SNID" type="text" size="13" maxlength="13">
          </td>
          <td width="8%" rowspan="2" align="center"><input type="submit" name="Submit" value="Search"></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">&nbsp;</td>
          <td colspan="3" align="left">&nbsp;</td>
          <td align="right" bgcolor="#efefef">&nbsp;</td>
          <td align="left">&nbsp;</td>
        </tr>
      </table>
    </form></td>
  </tr>
  <tr>
    <td colspan="4"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
      <%
		%>
      <tr bgcolor="#969ac2">
        <td  height="21" colspan="6" align="center"><span class="style1">出货导入报表</span></td>
      </tr>
      <tr bgcolor="#969ac2">
        <td width="6%"  height="21" align="center"><font color="#FFFFFF">帐号</font></td>
        <td width="10%"  align="center"><span class="style1">跟踪号码</span></td>
        <td width="5%"  align="center"><font color="#FFFFFF">日期</font></td>
        <td width="2%"  align="center">修改 </td>
        <td width="2%"  align="center">&nbsp;</td>
        <td width="1%"  align="center">&nbsp;</td>
      </tr>
      <%
	maxmessage=15
	PageNo = request("PageNo")
	if PageNo = "" or CInt(PageNo) < 1 then PageNo = 1
	
	
	if request("Submit")="Search"   or request("id")<>"" then 
		
		strSQL=" SELECT top 10000 * from outShip where 1=1"

			if request("startDate")<>"" then
				strSQL=strSQL & " and  date='"&request("startDate")&"'"
			end if
			
			if request("SNID")<>"" then
				strSQL=strSQL & " and  AccountNo='"&request("SNID")&"'"
			end if

			if request("id")<>"" then
				strSQL=strSQL & " and  id='"&request("id")&"'"
			end if
			
			if request("trackingno")<>"" then
				strSQL=strSQL & " and  trackingno='"&request("trackingno")&"'"
			end if


		strSQL=strSQL & " Order by id desc"
		set rs=server.CreateObject("adodb.recordset")
		rs.open strSQL,connstr,1,1
		if not rs.eof then
		
		rs.pagesize=maxmessage
		PageCount = rs.PageCount

		if CInt(PageNo) > PageCount then PageNo = PageCount
			rs.absolutepage = PageNo
			Rec_Total=rs.RecordCount
			n=0
			while not rs.eof and n < rs.pagesize
			n=n+1	

	%>
      <tr align="center" bgcolor="#efefef">
        <td><%=rs("AccountNo")%></td>
        <td><%=rs("trackingno")%> </td>
        <td><%=rs("date")%> </td>
        <td><a href="Edit2.asp?id=<%=rs("id")%>&AccountNo=<%=rs("AccountNo")%>">Edit</a> </td>
        <td><a href="addoutship.asp">add</a></td>
        <td><a href="deloutship.asp?id=<%=rs("id")%>">delete</a></td>
      </tr>
      <%
	rs.movenext
	wend
	%>
      <tr>
        <td colspan=6><div align="center">Page <%=PageNo%> of <%=PageCount%>&nbsp;&nbsp;Current Page:
          <%
		for i=1 to PageCount
			if cint(PageNo)=cint(i) then
				response.write "&nbsp;&nbsp;<b>"&i&"</b>"
			else
		%>
          &nbsp;&nbsp; <a href="outcheck.asp?submit=Search&PageNo=<%=i%>&PT=<%=request("PT")%>&startdate=<%=request("startdate")%>&SNID=<%=request("SNID")%>&"><%=i%></a>
          <%
			end if
		next
 end if
 rs.close
 end if %>
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr> </tr>
</table>
</BODY>
</HTML>